home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
buttons
/
sprspin
/
spintst.frm
< prev
next >
Wrap
Text File
|
1995-06-26
|
9KB
|
292 lines
VERSION 2.00
Begin Form Form1
BackColor = &H00C0C0C0&
Caption = "Examples Of SuperSpin"
ClientHeight = 3270
ClientLeft = 1650
ClientTop = 2775
ClientWidth = 7395
Height = 3675
Left = 1590
LinkTopic = "Form1"
ScaleHeight = 3270
ScaleWidth = 7395
Top = 2430
Width = 7515
Begin CommandButton cmdClone
Caption = "&Clone Me"
Height = 375
Left = 5880
TabIndex = 13
Top = 2760
Width = 975
End
Begin TextBox txtList
Height = 315
Left = 4200
TabIndex = 10
Top = 2040
Width = 1815
End
Begin TextBox txtMonths
Height = 315
Left = 4200
TabIndex = 8
Top = 1320
Width = 1815
End
Begin TextBox txtDays
Height = 315
Left = 4200
TabIndex = 7
Top = 600
Width = 1815
End
Begin CommandButton Command1
Caption = "E&xit"
Height = 375
Left = 2640
TabIndex = 4
Top = 2760
Width = 855
End
Begin TextBox txtTime
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 12
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
Left = 480
TabIndex = 2
Top = 2040
Width = 975
End
Begin Label lblNumber
BorderStyle = 1 'Fixed Single
Height = 315
Left = 480
TabIndex = 12
Top = 1320
Width = 975
End
Begin Label lblDate
BorderStyle = 1 'Fixed Single
Height = 315
Left = 480
TabIndex = 11
Top = 600
Width = 2535
End
Begin Image spnList
BorderStyle = 1 'Fixed Single
Height = 315
Left = 6000
Stretch = -1 'True
Top = 2040
Width = 315
End
Begin Label Label6
BackColor = &H00C0C0C0&
Caption = "Magazine Ad Formats"
Height = 255
Left = 4200
TabIndex = 9
Top = 1800
Width = 1935
End
Begin Image spnMonths
BorderStyle = 1 'Fixed Single
Height = 315
Left = 6000
Stretch = -1 'True
Top = 1320
Width = 315
End
Begin Image spnDays
BorderStyle = 1 'Fixed Single
Height = 315
Left = 6000
Stretch = -1 'True
Top = 600
Width = 315
End
Begin Label Label5
BackColor = &H00C0C0C0&
Caption = "Months"
Height = 255
Left = 4200
TabIndex = 6
Top = 1080
Width = 1935
End
Begin Label Label4
BackColor = &H00C0C0C0&
Caption = "Days of the Week"
Height = 255
Left = 4200
TabIndex = 5
Top = 360
Width = 1935
End
Begin Image spnTime
BorderStyle = 1 'Fixed Single
Height = 495
Left = 1440
Stretch = -1 'True
Top = 2040
Width = 315
End
Begin Image spnNumber
BorderStyle = 1 'Fixed Single
Height = 315
Left = 1440
Stretch = -1 'True
Top = 1320
Width = 315
End
Begin Label Label2
BackColor = &H00C0C0C0&
Caption = "Temperature Liquid Mercury"
Height = 255
Left = 480
TabIndex = 1
Top = 1080
Width = 2655
End
Begin Image spnDate
BorderStyle = 1 'Fixed Single
Height = 315
Left = 3000
Stretch = -1 'True
Top = 600
Width = 495
End
Begin Label Label3
BackColor = &H00C0C0C0&
Caption = "Diary times"
Height = 255
Left = 480
TabIndex = 3
Top = 1800
Width = 1935
End
Begin Label Label1
BackColor = &H00C0C0C0&
Caption = "Days in June 1995"
Height = 255
Left = 480
TabIndex = 0
Top = 360
Width = 1935
End
End
Sub cmdClone_Click ()
Dim tmpFrm As New Form1
tmpFrm.Show
tmpFrm.Move Me.Left + 100, Me.Top + 100
Set tmpFrm = Nothing
End Sub
Sub Command1_Click ()
Unload Me
End Sub
Sub Form_Load ()
' Show Resources
frmFSR.Show
Dim iSpinNr As Integer
iSpinNr = SpinInit(spnDate, lblDate, "Date")
Call SpinSetStep(iSpinNr, "1,d") ' 1 day
Call SpinSetMax(iSpinNr, "30-06-1995")
Call SpinSetMin(iSpinNr, "01-06-1995")
Call SpinSetFormat(iSpinNr, "dddd dd mmmm yyyy")
Call SpinSetValue(iSpinNr, Date)
Call SpinSetStepChange(iSpinNr, True)
iSpinNr = SpinInit(spnNumber, lblNumber, "Number")
Call SpinSetStep(iSpinNr, 1) ' step = 1 degrees centigrade
Call SpinSetMax(iSpinNr, 357) ' boiling point Mercury
Call SpinSetMin(iSpinNr, -39) ' melting point Mercury
Call SpinSetFormat(iSpinNr, "#,##0.00 " & Chr$(34) & "░C" & Chr$(34))
Call SpinSetValue(iSpinNr, 0)
Call SpinSetStepChange(iSpinNr, True)
iSpinNr = SpinInit(spnTime, txtTime, "Time")
Call SpinSetStep(iSpinNr, "15,n") ' 15 minutes
Call SpinSetMax(iSpinNr, "18:00") ' end of working day
Call SpinSetMin(iSpinNr, "08:00") ' start of working day
Call SpinSetValue(iSpinNr, Time)
Call SpinSetStepChange(iSpinNr, True)
iSpinNr = SpinInit(spnDays, txtDays, "Days")
Call SpinSetValue(iSpinNr, 3)
iSpinNr = SpinInit(spnMonths, txtMonths, "Months")
Call SpinSetValue(iSpinNr, 1)
iSpinNr = SpinInit(spnList, txtList, "List")
Call SpinSetList(iSpinNr, "1/16,1/8,1/4,1/2,3/4,1/1,2/2,1 1/2,2/1")
Call SpinSetValue(iSpinNr, 3) ' set the index
End Sub
Sub Form_Unload (Cancel As Integer)
Call SpinUnload(spnDate)
Call SpinUnload(spnTime)
Call SpinUnload(spnNumber)
Call SpinUnload(spnList)
Call SpinUnload(spnMonths)
Call SpinUnload(spnDays)
End Sub
Sub spnDate_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseDown(spnDate, Button, Shift, X, Y)
End Sub
Sub spnDate_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseUp(spnDate)
End Sub
Sub spnDays_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseDown(spnDays, Button, Shift, X, Y)
End Sub
Sub spnDays_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseUp(spnDays)
End Sub
Sub spnList_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseDown(spnList, Button, Shift, X, Y)
End Sub
Sub spnList_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseUp(spnList)
End Sub
Sub spnMonths_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseDown(spnMonths, Button, Shift, X, Y)
End Sub
Sub spnMonths_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseUp(spnMonths)
End Sub
Sub spnNumber_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseDown(spnNumber, Button, Shift, X, Y)
End Sub
Sub spnNumber_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseUp(spnNumber)
End Sub
Sub spnTime_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseDown(spnTime, Button, Shift, X, Y)
End Sub
Sub spnTime_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
Call SpinMouseUp(spnTime)
End Sub